﻿using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace SilverlightViewport.Common.Interop
{
    [ComImport, TypeLibType((short)0x10c0), 
    Guid("1FB839CC-116C-4C9B-AE8E-3DBB6496E326")]
    public interface IXcpControl
    {
        [DispId(0x20)]
        string Source { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), TypeLibFunc((short)12), DispId(0x20)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x20), TypeLibFunc((short)12)] set; }
        [DispId(0x2e)]
        bool IsLoaded { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), TypeLibFunc((short)12), DispId(0x2e)] get; }
        [DispId(0x31)]
        object Content { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x31), TypeLibFunc((short)12)] get; }
        [DispId(50)]
        object Settings { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), TypeLibFunc((short)12), DispId(50)] get; }
        [DispId(0x2c)]
        object OnLoad { [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), TypeLibFunc((short)12), DispId(0x2c)] get; [param: In, MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), TypeLibFunc((short)12), DispId(0x2c)] set; }
        [DispId(0x26)]
        object OnError { [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), TypeLibFunc((short)12), DispId(0x26)] get; [param: In, MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x26), TypeLibFunc((short)12)] set; }
        [return: MarshalAs(UnmanagedType.Interface)]
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020009)]
        IXcpObject CreateObject([In, MarshalAs(UnmanagedType.BStr)] string id);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x6002000a)]
        bool IsVersionSupported([In, MarshalAs(UnmanagedType.BStr)] string v);
        [DispId(0x33)]
        string InitParams { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), TypeLibFunc((short)12), DispId(0x33)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x33), TypeLibFunc((short)12)] set; }
    }
}
